#ifndef __THREAD_POOL__
#define __THREAD_POOL__
#include <47func.h>
#include "taskQueue.h"
typedef struct threadPool_s{
    pthread_t *tidArr;//所有子线程的数组
    int threadNum;//子线程的数量
    taskQueue_t taskQueue;//任务队列
    int exitflag;//退出标志 0 不退出 1 退出
}threadPool_t;
typedef struct train_s{
    int length;
    char data[1000];
}train_t;
int makeWorker(threadPool_t *pthreadPool);
void *threadFunc(void *arg);
int threadPoolInit(threadPool_t *pthreadPool,int threadNum);
int tcpInit(const char *ip, const char *port, int *psockfd);
int epollAdd(int epfd, int fd);
int epollDel(int epfd, int fd);
int recvFile(int sockfd);
int transFile(int netfd,char* filename);
#endif
